This page last changed on Jun 27, 2007 by ritchiem.
Pub/Sub Sustained Tests
We currently have one sustained test for pub / sub messaging. The test is based on the interop testing framework and as such there are two classes that are involve.
- org.apache.qpid.sustained.TestClient
- org.apache.qpid.sustained.TestCoordinator
As with the Interop Tests the Test Coordinator collects various clients to work on the specified test. The sustained test suit currently only has one test which is the SustainedTestClient.
SustainedTestClient Test
This test is a pub/sub test. There is a single publisher that sends batches of messages to a known topic. The clients then receive these messages and report the time required to retrive all of the batch. This reported time is sent to the publisher so that it can adjust its publication rate to ensure that messages are sent at a rate that all clients can maintain.
Usage
The coordinator can take a number of parameters.
- numReceives (Default : 2)
This is the number of receivers each client node should create
- batchSize (Default : 1000)
This is the number of messages to send per batch
- ackMode (Default : 1 - AUTO_ACK )
The acknowledgement mode to use. Currently No_ack (257) appears not to work correctly.
The client can take the following system parameters (set via -D properties)
(These values should be moved to the Coordinator so that you do not need to guess which client will become the sender as these values are only of use to the sending client.)
- sleepPerMessage (Default : false)
Divides the current _delay value into small sleeps between messages. Useful if your Thread.sleep implementation works at the nanosecond level. Under windows the smallest sleep value is around 10ms.
- warmUpBatches (Default : 10)
Adjusts the number of batches sent before resetting the delay calculations.
- stableReportCount (Default : 5)
The number of reports that need to arrive without changing the delay before reporting the delay is stable.
- batchVariance (Default : 3)
The difference between the batch number sent and the received batch number.
The client also has one additional parameter.
- "-j" can be used to join an existing test run. Dispite there being only one test case at present this class must be provided as future sustained test classes may be available.
It is important to remember that each cilent must be uniquly named for the test to accurately work. This can be done by ensuring that all clients specify a unique "-n" value. So running
Will correctly name the client 'client2' and attempt to joint the client to any running SustainedTestClient test. If there is no test running then the client will simply wait for the test to start.
|